export interface FilmReadHeader {
  seriesList: ArItem[];
  title?: string;
  seriesUId?: string;
  dataList: InItSettingsList;
  resultDataList: ResultData;
}

export interface ArListData {
  arList: ArItem[];
}

export interface ArItem {
  id: number;
  seriesUid: string;
}

// 无须数据返回通用结果
export interface DataCommonRes {
  code: number;
  data: null;
  msg: string;
  status: string;
}

// 需要传任务id的接口
export type TaskParams = {
  taskId: number;
};

// 初始化页面获取配置返回集合
export interface InItSettingsList {
  taskName: string;
  seriesCompList: SeriesItem[] | null;
  lesionList: LesionItem[];
  discardCodeList: string;
  defaultWindow?: string;
  findings?: boolean;
  diagnosis: boolean;
  showYay: boolean;
  showReport?: boolean;
  imageLayout: string;
}

export interface SeriesItem {
  componentId: number;
  required: boolean;
}

export interface LesionItem {
  name: string;
  lesion: string;
  color: string;
  toolList: string[];
  imageCompList: ImageCompItem[] | null;
}

export interface ImageCompItem {
  componentId: number;
  required: boolean;
}

export interface FormOptionsItem {
  id: number;
  acrId?: number;
  componentId: number;
  title: string;
  field: string;
  type: string;
  data?: DataItem[];
  parameter?: {
    [x: string]: string;
  };
  required: boolean;
  eyeStatus?: boolean;
}

export interface DataItem {
  value: string;
  label: string;
  children: DataItem[];
}

export interface ResultParams {
  arId: number;
}

export interface SeriesResultItem {
  id: number;
  componentId: number;
  result: string | string[];
}

export interface ResultData {
  lesionResult: LesionResult[];
}

export interface LesionResult {
  id: number;
  name: string;
  lesion: string;
  color: string;
  tool: string;
  imageCompResultList: ImageResultCompItem[] | null;
  result: string;
  resultType: number;
  resultDetailMap: DetailMap | null;
}

export interface ImageResultCompItem {
  id: number;
  componentId: number;
  result: string | string[];
}

export interface DetailMap {
  [x: string]: DetailItem[];
}

export interface DetailItem {
  id: number;
  groupId: string;
  tool: string | null;
  color: string | null;
  layer: number;
  result: string;
  resultType: number;
}